package com.java.gdu.controller;


import com.java.common.vo.R;
import com.java.gdu.entity.User;
import com.java.gdu.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Tom
 * @since 2021-04-16
 */
@CrossOrigin
@RestController
@RequestMapping("/admin/user")
@Api(description = "用户管理")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("")
    @ApiOperation(value = "用户登录")
    public R test(){
        List<User> list = userService.queryAll();
        return R.ok().data("list",list);
    }
}

